Flipkart Interview Experience | Set 26
1. Machine Coding: Two players, two field; and have multiple ships located in their fields. They are guessing each others ship position and hitting. Tell who wins first. Design maintainable code which can incorporate future change....
read more
Count of ways to choose 4 unique position elements one from each Array to make sum at most K
Given four arrays A[], B[], C[], D[] and an integer K. The task is to find the number of combinations of four unique indices p, q, r, s such that A[p] + B[q] + C[r] + D[s] ≤ K....
read more
Importance of Testing In Competitive Programming
Many times while solving problems, we face issues like time limit exceeds, wrong solution, runtime error, and memory limit exceeds because after designing algorithm we don’t test algorithm efficiency, correctness, time complexity and running the algorithm on a large set of inputs for testing purpose...
read more
Binary Search Algorithm – Iterative and Recursive Implementation
Binary Search Algorithm is a searching algorithm used in a sorted array by repeatedly dividing the search interval in half. The idea of binary search is to use the information that the array is sorted and reduce the time complexity to O(log N)....
read more
Merge Sort – Data Structure and Algorithms Tutorials
Merge sort is a sorting algorithm that follows the divide-and-conquer approach. It works by recursively dividing the input array into smaller subarrays and sorting those subarrays then merging them back together to obtain the sorted array....
read more
Largest Rectangular Area in a Histogram using Segment Tree
Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that all bars have same width and the width is 1 unit....
read more
Calculate weight of parenthesis based on the given conditions
Given a valid parenthesis string S, the task is to find the weight of the parenthesis based on the following conditions:...
read more
Maximize sum of minimum and maximum of all groups in distribution
Given an array arr[], and an integer N. The task is to maximize the sum of minimum and maximum of each group in a distribution of the array elements in N groups where the size of each group is given in an array b[] of size N....
read more
Reliance Jio Interview Experience for Graduate Engineer Trainee
Jio is having one of the most robust and fast pace interview process. Jio came to our campus for the position Of Graduate Engineer trainee and the job profile was of a data scientist....
read more
Minimum value of K such that sum of cubes of first K natural number is greater than equal to N
Given a number N, the task is to find the minimum value K such that the sum of cubes of the first K natural number is greater than or equal to N. Examples:...
read more
Find value after N operations to remove N characters of string S with given constraints
Given a string S of Size N. Initially, the value of count is 0. The task is to find the value of count after N operations to remove all the N characters of the given string S where each operation is:...
read more
Range and Update Sum Queries with Factorial
Given an array arr[] of N integers and number of queries Q. The task is to answer three types of queries....
read more